package com.software.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.software.bean.CartBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wyj
 * @since 2024-04-10
 */
public interface CartMapper extends BaseMapper<CartBean> {

    CartBean selectByCidAndPid(Integer customerId, Integer pid);

    List<CartBean> selectByCustomerId(Integer customerId);

    CartBean getCartBeanByCartIdAndCustomerId(Integer cartId, Integer cid);

    List<CartBean> selectByPidAndCid(@Param("pidList") List<Integer> pidList,  @Param("cid") Integer cid);
}
